package com.replication.log;

import org.slf4j.LoggerFactory;

/**
 * @author fire
 * @date 15/10/26.
 */
public class Slf4jLogger extends Logger {
    private org.slf4j.Logger logger;

    public Slf4jLogger(Class<?> cls) {
        this.logger = LoggerFactory.getLogger(cls);
    }

    public Slf4jLogger(String name) {
        this.logger = LoggerFactory.getLogger(name);
    }

    public void debug(String msg) {
        this.logger.debug(msg);
    }

    public void debug(String msg, Throwable cause) {
        this.logger.debug(msg, cause);
    }

    public void error(String msg) {
        this.logger.error(msg);
    }

    public void error(String msg, Throwable cause) {
        this.logger.error(msg, cause);
    }

    public void info(String msg) {
        this.logger.info(msg);
    }

    public void info(String msg, Throwable cause) {
        this.logger.info(msg, cause);
    }

    public boolean isDebugEnabled() {
        return this.logger.isDebugEnabled();
    }

    public boolean isErrorEnabled() {
        return this.logger.isErrorEnabled();
    }

    public boolean isInfoEnabled() {
        return this.logger.isInfoEnabled();
    }

    public boolean isWarnEnabled() {
        return this.logger.isWarnEnabled();
    }

    public void warn(String msg) {
        this.logger.warn(msg);
    }

    public void warn(String msg, Throwable cause) {
        this.logger.warn(msg, cause);
    }
}
